<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterPermissionAnchorAddColumnOrderStatusDealUser extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_sign_order_permission_anchor', function (Blueprint $table) {
            $table->unsignedTinyInteger('orderStatus')->default(0)->after("checkManagerId")
                  ->comment("和 sign_order 表的 status 同步 [0 关闭 1 正常]");

            $table->string('missionHandler')->default(0)->after("checkManagerId")
                  ->comment("任务处理人的信息 用逗号隔开");

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_sign_order_permission_anchor', function (Blueprint $table) {
            $table->dropColumn('orderStatus');
            $table->dropColumn('missionHandler');
        });
    }
}
